/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "fiscal_inscricoes_substitutas")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FiscalInscricoesSubstitutas.findAll", query = "SELECT f FROM FiscalInscricoesSubstitutas f")})
public class FiscalInscricoesSubstitutas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 2)
    private String uf;
    @Column(name = "INSCRICAO_ESTADUAL", length = 30)
    private String inscricaoEstadual;
    private Character pmpf;
    @JoinColumn(name = "ID_FISCAL_PAR_ESTADUAL", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private FiscalParEstadual idFiscalParEstadual;

    public FiscalInscricoesSubstitutas() {
    }

    public FiscalInscricoesSubstitutas(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUf() {
        return uf;
    }

    public void setUf(String uf) {
        this.uf = uf;
    }

    public String getInscricaoEstadual() {
        return inscricaoEstadual;
    }

    public void setInscricaoEstadual(String inscricaoEstadual) {
        this.inscricaoEstadual = inscricaoEstadual;
    }

    public Character getPmpf() {
        return pmpf;
    }

    public void setPmpf(Character pmpf) {
        this.pmpf = pmpf;
    }

    public FiscalParEstadual getIdFiscalParEstadual() {
        return idFiscalParEstadual;
    }

    public void setIdFiscalParEstadual(FiscalParEstadual idFiscalParEstadual) {
        this.idFiscalParEstadual = idFiscalParEstadual;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FiscalInscricoesSubstitutas)) {
            return false;
        }
        FiscalInscricoesSubstitutas other = (FiscalInscricoesSubstitutas) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.FiscalInscricoesSubstitutas[ id=" + id + " ]";
    }
    
}
